home *** CD-ROM | disk | FTP | other *** search
- AudComp V2.0
- by: Dan Charrois
- March 10, 1995
-
-
- LIMITATION OF LIABILITY
-
- No representations or warranties are stated or implied with respect to
- the accuracy, reliability, performance, or general operation of this
- software. All usage must be accepted at your own risk. The author does
- not assume any responsibility or liability whatsoever with respect to
- your use of this software.
-
- BACKGROUND PROBLEM
-
- Lately, there has been a great deal of interest in compressing data on the
- Amiga and other personal computers - and for good reason. The size of the
- "average" executable and data files are increasing dramatically as
- programmers endeavour to make their software as complete as possible.
- Many algorithms have been written which do a wonderful job of compressing
- code and data, but until now, there has been a noticeable lack in software
- specifically designed to compress audio files. Due to typical sampling
- rates of 10,000 samples/second and up, it doesn't take too long for a
- sample to use up a great deal of disk space.
-
-
- SOLUTION
-
- To address this problem, I have created AudComp - a program which can
- both compress audio IFF 8SVX files to a fraction of their original size,
- and decompress the resulting files back into an audio IFF 8SVX.
-
-
- DISTRIBUTION
-
- The following files are located in this archive:
-
- AudComp.readme - this file
- AudComp.881 - AudComp for 68020+/68881 systems
- AudComp.000 - AudComp for 68000 systems
-
- AudComp is freely distributable. You are encouraged to spread the
- software to as many BBSes as you can, provided that this archive remains
- unmodified.
-
-
- WHAT IS THE DIFFERENCE BETWEEN VERSION 1 AND VERSION 2?
-
- Strictly speaking, not a whole lot. I originally distributed AudComp
- Version 1 as keyware. My hopes were to make a bit of money in licensing
- out the software to interested individuals. Unfortunately, not a single
- person registered the software. I understood that this would not become
- the most frequently used piece of software in existence, but I honestly
- expected a bit better.
-
- At any rate, I've come to the conclusion that it was pointless for me
- to have spent all that time and effort writing AudComp if nobody was
- able to use it. So, I've released this version - Version 2.0. The only
- principal difference between Version 1 and Version 2 is that you no
- longer need a keyfile. Anyone may use the software in non-commercial
- applications, without restrictions, and without registration.
-
- If you find it useful, however, I would appreciate a small donation. If
- I see some support from this software, I might have time to extend the
- work further. There are still lots of things which can be done!
-
- Please send donations, postcards, or anything else you feel you can
- part with to:
-
- Dan Charrois
- Box 75
- Legal, Alberta
- T0G 1L0
- CANADA
-
-
- IS THERE ANY OTHER SOFTWARE DESIGNED TO COMPRESS AUDIO IFF 8SVX FILES?
-
- Strictly speaking, almost any compression algorithm should be able to
- reduce the size of an audio file somewhat. However, non-lossy algorithms
- (algorithms which can restore the file back to its exact original form) such
- as Stefan Boberg's LHA usually do not perform any better than getting
- in the neighbourhood of a 20% file size reduction.
-
- To get a substantial compression ratio, we must resort to lossy algorithms.
- This class of compression algorithm does not guarantee to decompress a file
- back to its exact original form, but instead will only try to come up with
- something approximating the original. Ideally, this approximation should
- be almost indistinguishable from the original. AudComp uses a lossy
- algorithm particularly designed for use with audio files to try and get
- the best results with as high a compression ratio as possible.
-
- To my knowledge, the only other software currently in existence for the
- Amiga to compress audio files using a lossy algorithm are a few titles which
- support the Fibonacci-Delta encoded method (such as PerfectSound).
- This format (documented in the Amiga Rom Kernel Reference Manuals as an IFF
- standard), provides a fairly good compression ratio, though nowhere near
- as good as files created by AudComp. Typically, files created using
- Fibonacci-Delta encoding take up half the disk space as uncompressed files,
- whereas AudComp routinely creates compressed files being 10 times smaller
- than the original or better!
-
-
- WHAT DOES "QUALITY" OF A COMPRESSION MEAN?
-
- Some mention was made of the "quality" of compression a little earlier.
- This is simply some measure of how well the decompressed version of a
- file using a lossy algorithm varies from the original. Fibonacci-Delta
- encoded audio files have a fixed "quality". AudComp, on the other hand,
- allows you to vary the quality of compression. If, for example, you were
- to choose a very high quality, the resulting compressed file would be
- relatively large (though usually still substantially smaller than a
- Fibonacci-Delta compressed file) , but upon decompressing the file
- the results would be virtually indistinguishable from the original. If
- intelligibility is your only criteria, you can decrease the quality required,
- resulting in extremely high compression ratios. This archive contains a
- few files of the same audio sample compressed at varying quality factors, to
- allow you to assess what different quality compressions sound like, and to
- give you an idea of the varying file sizes associated with each compression
- quality.
-
-
- WHAT KIND OF AUDIO FILES DOES IT WORK BEST ON?
-
- The best results usually occur on audio files containing a digitization of
- speech. In fact, the original purpose of this software was to provide
- a high compression for use with voice mail. If intelligibility is your
- main criteria, you can usually bring the compression quality down to a point
- where you're compressing the files by a factor of 10 or more. For
- compression of music, musical instruments, etc., you will find that you will
- need a fairly high quality compression to retain an acceptable harmonic
- range. Nevertheless, even fairly high quality compressions using AudComp
- usually still require substantially less storage space than compressions
- using another method.
-
-
- HOW DOES AUDCOMP WORK?
-
- Audcomp works by breaking up a sample into many smaller "windows". The
- frequency content of each of these windows is evaluated, and less dominant
- frequencies are "thrown away" while the primary frequencies are encoded
- and stored in the compressed file. This fairly simple process results
- in extremely high compression ratios, and although the compression is lossy,
- only the less dominant frequency terms are lost.
-
- If you are a developer interested in including the ability for your
- software to compress and decompress audio files using the AudComp
- algorithms, the required object files are available, along with
- the required documentation and examples of their usage, for the fee of
- $100.00 in Canadian funds to the above address. Source code can not be
- made available.
-
- One interesting thing about files compressed using AudComp is that since
- they are not compressed using an algorithm similar to that used by LHA,
- Zoo, etc., they can be compressed even further by these other
- compression programs. For example, LHA'ing a file compressed by AudComp
- can often reduce its size further by a third or more.
-
-
- WHY IS THE AUDCOMP EXECUTABLE SO BIG?
-
- When determining the frequency content of a sample, AudComp makes use
- of the Fast Fourier Transform. Despite its quick sounding name, it
- is still quite slow. A `classical' FFT is heavily recursive, which
- tends to slow down its operation. The FFT used in this package has
- been `unrolled' so that it is not recursive, resulting in a substantial
- speed improvement at an increase in code size.
-
- The executable was compiled with SAS C V6.55, with full optimization on
- (which incidentally, took 16 hours to compile the two executables with
- my 33 Mhz 68030).
-
-
- COMPARISONS BETWEEN OTHER COMPRESSION ALGORITHMS
-
- By far, AudComp's biggest selling feature is the dramatic compression ratios
- it can attain when compressing audio files. Here is a brief summary of the
- results of compressing a sample audio file using a variety of different methods.
-
- Compression Method File Size Compression factor
- ------------------ --------- ------------------
- original 60930 1.0X
- zoo 50657 1.2X
- compress 48039 1.3X
- lha 43774 1.4X
- Fibonacci-Delta 30766 2.0X
- AudComp, quality 9 15852 3.8X
- AudComp, quality 9 + lha 10540 5.8X
- AudComp, quality 7 5568 10.9X
- AudComp, quality 7 + lha 4202 14.5X
- AudComp, quality 5 3279 18.6X
- AudComp, quality 5 + lha 2559 23.8X
- AudComp, quality 3 2133 28.6X
- AudComp, quality 3 + lha 1706 35.7X
-
- Admittedly, an AudComp quality 3 file doesn't result in a very great
- sounding output when it is decompressed, but I think that the results
- of using AudComp are obvious. To me personally, an AudComp quality
- 9 file often sounds better than a Fibonacci-Delta compressed file, and
- I usually still find voice files intelligible even when compressed down
- to a a quality of 5 or 6.
-
-
- USING THE AUDCOMPDEMO SOFTWARE
-
- Before you start, keep in mind that you'll need a stack of at least 15000
- (20000 might be a bit better) to run the program.
-
- One of the first things you'll notice in using the software on an
- unaccelerated Amiga is that the decompression is quite slow. For this
- reason, two versions of the AudComp software are provided.
- AudComp.000 is provided for those with an unaccelerated Amiga (stock
- 68000), and AudComp.881 is provided for those with a 68020+ CPU and a
- math chip. Suffice it to say that the version for accelerated
- computers is substantially faster than that for unaccelerated computers.
- Rename the appropriate version to `AudComp' and you won't have to worry
- about it ever again.
-
- To compress an audio file, type
-
- AudComp c <decompressed filename > <compressed filename> <quality>
-
- where <quality> is a number from 1 to 9 indicating the quality of
- compression desired (1=worst quality, highest compression, 9=best
- quality, lowest compression). A status line will appear indicating
- how the compression is progressing. When it is done, you will have
- created the compressed audio sample.
-
- To decompress an AudComp-compressed file, type
-
- AudComp d <compressed filename> <decompressed filename>
-
- A status line will appear below describing what portion of the decompression
- has been completed. When the status line reaches 100%, the decompression
- is done. You then have an IFF 8SVX audio file called whatever you specified
- when you called audcomp. This can be played with any of the many IFF 8SVX
- sound players publicly available, such as "Sound" or "upd".
-
-
- FUTURE DIRECTIONS
-
- Future versions of this software will depend on the success of the
- current version. Some the things I would like to work on for future
- versions include:
-
- - Faster operation. It may be possible to tweak a bit more speed out
- of the algorithm.
- - Better compression ratios. Believe it or not, it may still be possible
- to compress the files down a bit further yet.
- - Better quality sound at a given compression ratio.
- - GUI (Graphic User Interface) for Workbench users.
-
-
- FURTHER QUESTIONS
-
- If you have any questions, comments, or suggestions regarding AudComp,
- please feel free to contact me. If you have access to Internet email,
- my email account is "charro@ee.ualberta.ca". And of course, you can
- always write to me at the postal address given earlier if you prefer.
-
- Thanks for your interest in AudComp.
-
- Dan Charrois
-
-
-
- OTHER SOFTWARE PACKAGES REFERENCED IN THIS DOCUMENT
-
- Lha - Stefan Boberg
- Zoo - Rahul Dhesi
- compress - Unix distribution. Unix is a trademark of AT&T.
- Perfect Sound - Anthony J. Wood
- Sound - Richard Lee Stockton
- Upd - Jonas Petersson
-